<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->bigIncrements('id')->unsigned();
            $table->string('name')->index()->nullable();
            $table->string('email')->unique();
            $table->boolean('isAdmin')->default(false);           
            $table->string('password', 60);
            $table->string('avatar')->nullable();
			$table->string('position')->nullable();
			$table->enum('sex',array('male','female','secret'))->default('secret')->nullable();
			$table->string('hospital',60)->nullable();
			$table->string('address',200)->nullable();
			$table->string('signature',255)->nullable();
            $table->rememberToken();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('users');
    }
}
